Carbon


ForEachIconDo

Header: Icons.h Carbon status: Supported

Performs an action on one or more icons in an icon suite.

OSErr ForEachIconDo (
    IconSuiteRef theSuite, 
    IconSelectorValue selector, 
    IconActionUPP action, 
    void *yourDataPtr
);
theSuite

A handle to an icon suite.

selector

Indicates which icons in the suite to perform the operation on. See “Selector Mask Values” for a description of the values you can use in this parameter.

action

A universal procedure pointer to your icon action callback function. The ForEachIconDo function uses this icon action function to perform an action on the specified icons in the icon suite.

ForEachIconDo calls your icon action function once for each type of icon specified in the selector parameter. ForEachIconDo passes to your icon action function a handle to the icon to perform the action on. Your icon action function should perform any action as indicated by the yourDataPtr parameter and return a result code.

See the IconActionProcPtr callback for more information about icon action functions.

yourDataPtr

A pointer to data or other information required by your icon action function that is passed to your icon action function. Typically, you use this parameter to specify which action your icon action function should perform.

function result

A result code. The result code returned by your icon action function. If your icon action function returns a nonzero function result, ForEachIconDo immediately returns to the application.

SPECIAL CONSIDERATIONS

This function may move or purge memory blocks in the application heap. For that reason, your application should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/18/2000)